package com.ruoyi.hr.service.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.hr.domain.Events;
import com.ruoyi.hr.domain.Laguages;
import com.ruoyi.hr.mapper.EventsMapper;
import com.ruoyi.hr.mapper.LaguagesMapper;
import com.ruoyi.hr.service.EventsService;
import com.ruoyi.hr.service.LaguagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EventsServiceImpl implements EventsService {
    @Autowired
    private EventsMapper eventsMapper;

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<Events> findEvents(Long eid, String type) {
        return eventsMapper.findEvents(eid, type);
    }

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<String> findQuitEmp(String effectdate) {
        return eventsMapper.findQuitEmp(effectdate);
    }

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public int findIsQuit(List<String> allEid) {
        return eventsMapper.findIsQuit(allEid);
    }


    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public int findIsEv(List<String> allEid) {
        return eventsMapper.findIsEv(allEid);
    }
}
